﻿<UserControl x:Class="PeteBrown.ConferenceTrivia.Controls.Tombstone"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="874" d:DesignWidth="695">
	

    <UserControl.Resources>
        <Storyboard x:Key="ShakeAndAppear">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)"
                                           Storyboard.TargetName="grid">
                <EasingDoubleKeyFrame KeyTime="0"
                                      Value="1000">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ElasticEase EasingMode="EaseOut"
                                     Oscillations="1"
                                     Springiness="10" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:2"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ElasticEase EasingMode="EaseOut"
                                     Oscillations="1"
                                     Springiness="10" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"
                                           Storyboard.TargetName="grid">
                <EasingDoubleKeyFrame KeyTime="0"
                                      Value="50"
                                      EasingFunction="{x:Null}" />
                <EasingDoubleKeyFrame KeyTime="0:0:2"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ElasticEase EasingMode="EaseOut"
                                     Oscillations="15"
                                     Springiness="7" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Viewbox>
            <Grid Width="695"
                  Height="874">
                <Grid>
                    <Grid.Clip>
                        <RectangleGeometry Rect="0,-20,695,794" />
                    </Grid.Clip>

                    <Grid x:Name="grid"
                          RenderTransformOrigin="0.5,0.5">
                        <Grid.RenderTransform>
                            <CompositeTransform TranslateY="1000" />
                        </Grid.RenderTransform>

                        <Image Source="../Assets/Tombstone1.png" />

                    <Grid Margin="115 90 115 200">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                            <TextBlock Grid.Row="0"
                                       Text="{Binding Author}"
                                       Style="{StaticResource TweetAuthorStyle}">
                                                <TextBlock.Effect>
                                                    <DropShadowEffect BlurRadius="15"
                                                                      Color="Black"
                                                                      ShadowDepth="0" />
                                                </TextBlock.Effect>

                            </TextBlock>

                            <TextBlock Grid.Row="1"
                                       Text="{Binding Message}"
                                       Style="{StaticResource TweetMessageStyle}">
                                                <TextBlock.Effect>
                                                    <DropShadowEffect BlurRadius="10"
                                                                      Color="Black"
                                                                      ShadowDepth="0" />
                                                </TextBlock.Effect>

                            </TextBlock>

                        </Grid>
                </Grid>

                </Grid>
                
                <Image Source="../Assets/Tombstone1_Grass.png" />

            </Grid>
        </Viewbox>

    </Grid>
</UserControl>
